package com.zhao.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.zhao.bean.Dish;
import com.zhao.dao.dishDao;
import com.zhao.service.dishService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Transactional
@Service
public class dishServiceImpl implements dishService {

    @Autowired
   private dishDao dao;
    @Override
    public long findDish(long id) {
        LambdaQueryWrapper<Dish> wrapper = new LambdaQueryWrapper();
        wrapper.eq(Dish::getCategoryId,id);
        return dao.selectCount(wrapper);
    }
}
